package Homework1;

import java.util.Scanner;

public class Homework1_6 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int count = 0;
        for (int i = 2; i <= n; i++){
            int judge = 1;
            for (int j = 2; j <= Math.sqrt((double) i); j++){
                if (i % j == 0){
                    judge = 0;
                    break;
                }
            }
            if (judge == 1) {
                count += 1;
            }
        }
        System.out.println(count);
    }

}
